1. Define extent
Create a bounding box for the study area
2. Download data
Get trail data
Note: this includes the classifications of ‘path’ (multi-use), ‘footway’ (foot traffic only), and “steps” (i.e. stairs)
Get trailhead data
Note: this is specifically for named trailheads. There are numerous parking areas that are at the start of trails that do now show up as trailheads.
trailhead <-
osmdata::opq(bbox = glac_bbox) %>%
osmdata::add_osm_feature(key = 'highway', value = c("trailhead")) %>%
osmdata::osmdata_sf()## Request failed [504]. Retrying in 1 seconds...
Get parking area data
This seems like it could be useful to augment trailhead data. That said, parking areas include many pull outs along roads that are deffinitly not trail access locations.
Get data for all road types
Note the number of different road classifications that OpenStreetMap uses. All common road types are included below.
all_roads <-
osmdata::opq(bbox = glac_bbox) %>%
osmdata::add_osm_feature(
key = 'highway',
value = c("motorway", "trunk", "primary", "secondary", "tertiary",
"unclassified", "residential", "motorway_link", "trunk_link",
"primary_link", "secondary_link", "tertiary_link",
"living_street", "service")
) %>%
osmdata::osmdata_sf()